setNativePixelBuffer

abstract fun setNativePixelBuffer(pixelStreamFill: DesignBlock, width: Int, height: Int): Int

Update the pixels of the given pixelStreamFill block. This method should be called in order to bind a new android.graphics.SurfaceTexture to the pixelStreamFill, as well as after every android.graphics.SurfaceTexture.updateTexImage invocation. Note that the native texture is created only once: all subsequent calls on the same pixel stream fill will return the same id.

Return

the id of the native texture. Can set to the constructor of android.graphics.SurfaceTexture.

Parameters

pixelStreamFill

the target fill which pixel data should be bound to a native texture.

width

the width of the native texture.

height

the height of the native texture.